<%@page import="com.wanmait.travel.vo.Scenic"%>
<%@page import="java.sql.Timestamp"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.List"%>
<%@page import="com.wanmait.travel.vo.Userinfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <% String path=request.getServletContext().getContextPath();
     SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");%>
     <jsp:include page="/inc/header.jsp"></jsp:include>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>个人信息</title>
<meta name="keywords" content="" />


<link href="<%=path %>/css/font-awesome.css" rel="stylesheet"> 
<link rel="stylesheet" href="<%=path %>/css/lightbox.css" type="text/css" media="all" />
<link href="<%=path %>/css/popuo-box.css" rel="stylesheet" type="text/css" media="all" />
<link href="<%=path %>/css/style_c.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>

             <%Userinfo userinfo=(Userinfo)request.getAttribute("userinfo"); %>
			<div class="about" id="about">
		<div class="col-md-6 person-info-agileits-w3layouts">
		<h3 class="w3_head w3_head1">我的信息 <span><%=userinfo.getNickname() %>的个人信息</span></h3>
			<ul>
				<li name="username"><span>用户名</span>:<%=userinfo.getUsername()%></li>
				<li name="nickName"><span>昵称</span>:<%=userinfo.getNickname()%></li>
				<li name="gender"><span>性别</span>:<%=userinfo.getGender()%></li>
				<li name="phone"><span>电话</span>:<%=userinfo.getPhone()%></li>
				<li name="birthday"><span>生日</span>:<%=sdf.format(userinfo.getBirthday())%></li>
				<li name="realName" value="<%=userinfo.getRealName()%>"><span>真实姓名</span>:<%=userinfo.getRealName()%> </li>
				<li name="address" value="<%=userinfo.getAddress()%>"><span>家庭住址</span>:<%=userinfo.getAddress()%></li>
				
				
				
				<%Userinfo userinfo1 =(Userinfo)request.getSession().getAttribute("uesrinfo"); %>
			<a href="<%=path%>/UserinfoController?action=updateshow&id=<%=userinfo.getId()%>">修改</a>
			</ul>
		</div>
		<img src="<%=path%>/image/八大关.jpg" style="margin-left:650px;margin-top:-700px;">
		<div style=" width:400px; margin-left:1500px;margin-top:-700px; height:800px; text-align:center;">
		<%List<Scenic> scenics=(List<Scenic>)request.getAttribute("scenics"); %>
		我的收藏
		
      
        <%   
       for(int i=0;scenics!=null&&i<scenics.size();i++){
    	   Scenic scenic=scenics.get(i);
       %> 
        <ul id="li<%=scenic.getId()%>">
       <li style="list-style-type:none;" >
       <img  src="/Travel/image/<%=scenic.getIntroPic()%>"><br>
      <a href="<%=path %>/ShowServlet?action=list&id=<%=scenic.getId() %>"> <%=scenic.getName() %></a>
      <input type="button"  value="删除"  id="delete" onclick="deleted(this)" data-id="<%=scenic.getId()%>" style="width:50px;">
       </li>
       </ul>
       <% }%> 
       </div>
</body>
</html>
<script>
		function deleted(me)
		{
			
			var action="/Travel/UserinfoController?action=deletedCollection";
			var scenicid=$(me).data("id");
			
			 $.post(action,{id:scenicid},function(mes){
				
				 $("#li"+scenicid).remove();
					});
			 
		}
	
		
		</script>
<script type="text/javascript" src="<%=path %>/js/bootstrap-3.1.1.min.js"></script>

<jsp:include page="/inc/footer.jsp"></jsp:include>